﻿using System;

namespace DemoRealtimeData.Service
{
    public sealed class Measurement
    {
        public DateTime Time { get; private set; }
        public string Device { get; private set; }
        public DataType DataType { get; private set; }
        public double Value { get; private set; }

        public Measurement(DateTime time, string device, DataType dttype, double value)
        {
            this.Time = time;
            this.Device = device;
            this.DataType = dttype;
            this.Value = value;
        }

        public string Key
        {
            get { return Common.MakeKey(Device, DataType); }
        }

    }
}
